﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace ModelViewerAux
{
    public class EffectPlusReader : ContentTypeReader<EffectPlus>
    {
        protected override EffectPlus Read(ContentReader input,
                                            EffectPlus existingInstance)
        {
            Effect effect = input.ReadObject<Effect>();

            string effectName = input.ReadString();

            Effect emptyEffect = effect.Clone();

            EffectPlus effectPlus = new EffectPlus(emptyEffect);
            effectPlus.Effect = effect;
            effectPlus.EffectName = effectName;
            return effectPlus;
        }
    }
}
